package main.java.DMDE.model.relationships;

import java.util.UUID;

import main.java.DMDE.model.Diagram;
import main.java.DMDE.model.relationships.strategy.AssociationStrategy;
import main.java.DMDE.styling.StyleConstants;

public class Association extends Relationship {

    private Direction direction;

    public Association(RelationshipComponent componentA,
	    RelationshipComponent componentB,UUID id) {
	super(componentA, componentB,id);
	linkName = StyleConstants.RELATIONSHIP_LINK_ASSOCIATION_STYLE;
    }

    public Association(Diagram diagram,UUID id) {
		super(id);
		validationStrategy = new AssociationStrategy(diagram);
		linkName = StyleConstants.RELATIONSHIP_LINK_ASSOCIATION_STYLE;
    }

    public Association(Diagram diagram) {
    	validationStrategy = new AssociationStrategy(diagram);
    	linkName = StyleConstants.RELATIONSHIP_LINK_ASSOCIATION_STYLE;
    }

	@Override
    public void setDirection(Direction direction) {
	this.direction = direction;
    }

    @Override
    public Direction getDirection() {
	return direction;
    }

    @Override
    public RelationshipTypes getType() {
	return RelationshipTypes.Association;
    }

}
